package niso;

import java.sql.Date;

public class InventoryRecord {

	//Attributes
	private String ID,SupplyName,unitName;
	private Date time;
	private int in,out;
	
	//Constructors
	public InventoryRecord(String id, String name,Date T,int i,int o){
		//In case no unit was specified
		ID=id;
		SupplyName=name;
		unitName="";
		time=T;
		in=i;
		out=o;
	}
	
	public InventoryRecord(String id,String uName,String name,Date T,int i,int o){
		//ideal constructor
		ID=id;
		SupplyName=name;
		unitName=uName;
		time=T;
		in=i;
		out=o;
	}
	
	/*
	 * get and set
	 * also includes the getbalance
	 * */
	public String getID(){return ID;}
	public int getIn(){return in;}
	public int getOut(){return out;}
	public Date getTimeRecorded(){return time;}
	public String getSupplyName(){return SupplyName;}
	public String getUnitName(){return unitName;}
	public int getBalance(){return (in-out);}
	
	public void setIn(int i){in=i;}
	public void setOut(int o){out=o;}
	public void setSupplyName(String name){SupplyName=name;}
	public void setUnitName(String name){unitName=name;}
	
	/*
	 * +getBalance():int
	+getIn():int
	+getOut:int
	+getTimeRecorded():Date
	+getSupplyName():String
	+setIn(int):void
	+setOut(int):void
	+setSupplyName(String):void
	+setSupply(Product):void
	+UpdateDB(String):void
	 */
}
